package com.example.controller;

import com.example.pojo.dto.BossDTO;
import com.example.pojo.entity.JobRecruiter;
import com.example.service.PostService;
import com.example.service.RecruiterService;
import com.example.vo.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * @author 小岁
 * @version 2023/10/5 23:25
 */
@RestController
@RequestMapping("searchMessage")
public class RecruiterMessageController {
    @Autowired
    private RecruiterService recruiterService;

    @Autowired
    private PostService postService;

    @PostMapping("search/{contactPerson}")
    public List<JobRecruiter> login(@PathVariable("contactPerson") String contactPerson) {
        List<JobRecruiter> searchResults=recruiterService.getByConcatPerson(contactPerson);

        return searchResults;
    }
    @GetMapping("reName")
    public Result name(Integer id){
        BossDTO bossDTO= recruiterService.findByRecruiter(id);
        return new Result(200,"成功",bossDTO);
    }

}
